package com.key.win.system.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.key.win.base.web.PageRequest;
import com.key.win.base.web.PageResult;
import com.key.win.system.model.SysOrgan;
import com.key.win.system.model.SysUser;

import java.util.List;
import java.util.Map;
import java.util.Set;

public interface SysUserService extends IService<SysUser> {
    PageResult<SysUser> findSysUserByPaged(PageRequest<SysUser> t);

    Map<String, Object> login(SysUser sysUser, String userAgent);

    List<SysUser> findSysUserByUserName(String userName);

    boolean updateSysUser(SysUser sysUser);

    List<SysUser> findSysUserByOrganId(String organId);

    boolean saveSysUser(SysUser sysUser);

    boolean modifyPassword(SysUser sysUser);

    boolean resetPassword(String id);

    void setUserToGroup(String groupId, Set<String> userIds);

    List<SysUser> findSysUserByGroupId(String groupId);

    PageResult<SysUser> getUserPagedByOrganId(PageRequest<SysUser> pageRequest);

    SysUser getUserFullById(String id);

    boolean deleteById(String id);

    Map<String, Object> refreshToken(String token, String userAgent);

    boolean updateEnabled(SysUser sysUser);

    void setOrganToUser(String id, Set<String> organIds);

    List<SysOrgan> getOrganByUserId(String userId);
}
